<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
{:token()}
    <!--分类-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Live_category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-live_category_id" data-rule="required" class="form-control selectpicker" name="row[live_category_id]">
                {foreach $categoryList as $k=>$v}
                <option  value="{$v['id']}">{$v.platename}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <!--标题-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" >
        </div>
    </div>
    <!--描述-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="">
        </div>
    </div>

    <!--直播密码-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-password" data-rule="number,length[4]" class="form-control" name="row[password]" type="number" value="">
            <span>设置密码后,主播扫描二维码获取直播相关信息时需要输入此密码(密码为4位数字)</span>
        </div>
    </div>

    <!--推流域名-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('push_url')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-push_url" data-rule="required" class="form-control" name="row[push_url]" type="text" >-->
<!--        </div>-->
<!--    </div>-->
    <!--拉流域名-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('pull_url')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-pull_url" data-rule="required" class="form-control" name="row[pull_url]" type="text" >-->
<!--        </div>-->
<!--    </div>-->
    <!--直播地址AppName-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('live_app_name')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-live_app_name" data-rule="required" class="form-control" name="row[live_app_name]" type="text" value="live">-->
<!--        </div>-->
<!--    </div>-->
    <!--直播地址的StreamName(串流名)-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('live_stream_name')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-live_stream_name" data-rule="" class="form-control" name="row[live_stream_name]" type="text" value="" readonly>-->
<!--        </div>-->
<!--    </div>-->


    <!--直播推流地址-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('push_live_url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-push_live_url" data-rule="" class="form-control" name="row[push_live_url]" type="text" value="" readonly>
        </div>
    </div>
    <!--直播播放地址-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Live_url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-live_url" data-rule="" class="form-control" name="row[live_url]" type="text" value="" readonly>
        </div>
    </div>
    <!--预览图-->
    <div class="form-group" data-field="thumbnail">
        <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control hidden" size="50" name="row[image]" type="text" value="" placeholder="上传图片">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="plupload-image"
                                class="btn btn-danger plupload"
                                data-input-id="c-image"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                data-multiple="false"
                                data-preview-id="p-image">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span>
                        <button type="button"
                                id="fachoose-image"
                                class="btn btn-primary fachoose"
                                data-input-id="c-image"
                                data-mimetype="image/*"
                                data-multiple="false">
                            <i class="fa fa-list"></i> {:__('Choose')}
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <!--直播时间-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Live_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-live_time" data-rule="required" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[live_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>

    <!--是否在侧边栏展示-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否在侧边栏展示')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_sidebar]', ['1'=>__('Yes'), '0'=>__('No')],1)}
        </div>
    </div>

    <!--会员价格-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" name="row[membership_price]" type="number" step="any" min="0" data-rule="required;range(0~)" value="0">
        </div>
    </div>
    <!--会员时长-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_duration" class="form-control" name="row[membership_duration]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
